package com.huangsm.cloud.config;

import com.huangsm.cloud.consumer.ExcludeFromComponetScan;
import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 自定义Ribbon配置类
 * @author huangsm
 * @version V1.0
 */
//@Configuration
//@ExcludeFromComponetScan
public class RibbonConfig {
 /*   @Autowired
    IClientConfig config;*/

    /**
     * 自定义负载均衡规则
     * @return
     */
    @Bean
    public IRule ribbonRule(){
        return new RandomRule();
    }
}
